package testmodel;

import velox.jcr.mapper.CascadeType;
import velox.jcr.mapper.declarative.DeclarativeMapper;
import velox.jcr.mapper.loader.GrandParentLoader;

public class OrderLineMapper extends DeclarativeMapper<OrderLine> {
	public OrderLineMapper() {
		setCache(true);
		setClass(OrderLine.class);
		setIdMapping("id", "article");
		addBasicMapping("article");
		addBasicMapping("amount");
		addBasicMapping("price");
		addParentMapping("order", Order.class, CascadeType.PERSIST, new GrandParentLoader());
	}
}
